<!DOCTYPE html>
<html>
    <head>
        <? require_once 'header.php'; ?>
    </head>
    <body>
        <?
        getNavbar();
        ?>
        <div class="container-fluid">
            <div class="row-fluid" style="margin-top: 40px;">
                <h1 align="center"><? echo $this->getRepublica()->getNome(); ?></h1>
            </div>
            <div class="row-fluid">
                <div class="span9">
                    <div class="navbar">
                        <div class="navbar-inner">
                            <a class="brand" href="#">Descrição</a>
                        </div>
                        <div class="container-fluid well">
                            <div class="span3">
                                <h3 align="center" style="margin: 0px;">Imagens</h3>
                                <?
                                $this->getImagensRepublica($this->getRepublica());
                                ?>
                            </div>
                            <div class="span9">
                                <p>
                                    <strong>Descrição:</strong><br>
                                    <?
                                    echo $this->getRepublica()->getDescricaoEndereco();
                                    ?>
                                </p>
                                <address>
                                    <b>Endereço:</b><br>
                                    <? echo $this->getRepublica()->getEndereco()->getDescricao(); ?><br>
                                    <? echo $this->getRepublica()->getCidade()->getNome() . ', ' . $this->getRepublica()->getCidade()->getEstado()->getNome(); ?><br>
                                    <abbr title="Telefone">Tel:</abbr> (123) 456-7890
                                </address>
                                <p>
                                    <b>Vagas:</b> <? echo $this->getRepublica()->getQuantiaVagas(); ?>
                                </p>
                                <p>
                                    <b>Republica:</b> <? echo $this->getRepublica()->getTipo(); ?>
                                </p>
                                <?
                                $this->getFormSolicitacao($this->getRepublica());
                                ?>
                            </div>
                        </div>
                    </div>
                    <div class="navbar">
                        <div class="navbar-inner">
                            <a class="brand" href="#">Comentarios</a>
                            <ul class="nav">
                                <li class="active"><a href="#comentarioMoradores" data-toggle="tab">Moradores</a></li>
                                <li><a href="#comentarioVisitantes" data-toggle="tab">Visitantes</a></li>
                            </ul>
                        </div>
                        <div class="container-fluid well">
                            <div class="tab-content">
                                
                                <div class="tab-pane active" id="comentarioMoradores">
                                    <?
                                    $this->getNotaRepublica($this->getRepublica());
                                    $this->getComentariosRepublica($this->getRepublica(),3);
                                    $this->getTodosComentarios();
                                    ?>
                                </div>
                                <div class="tab-pane" id="comentarioVisitantes">
                                    <?
                                    $this->getNotaRepublica($this->getRepublica());
                                    $this->getComentariosRepublica($this->getRepublica(),3);
                                    $this->getTodosComentarios();
                                    ?>
                                </div>
                            </div>
                            
                        </div>
                    </div>
                </div>
                <div class="span3" align="center">
                    <div class="navbar">
                        <div class="navbar-inner">
                            <a class="brand" href="#">Moradores</a>
                        </div>
                        <div class="container-fluid well">
                            <?
                            $this->getMoradores($this->getRepublica());
                            ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <?
        require_once 'footer.php';
        ?>
    </body>
</html>
